package com.design.pattern.behaviour.state;

/**
 * @Author hanyuanlai
 * @Date 2022/9/13
 */
public class Test {
    public static void main(String[] args) {
        Car car = new Car(new StoppedState());
        car.openDoor();
        car.setCarState(new OpenState());
        car.openDoor();
        car.setCarState(new ClosedState());
        car.openDoor();
        car.setCarState(new RuningState());
        car.openDoor();
    }
}
